package com.yao2san.simcasserver.login;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller("/cas/login")
public class LoginController {

    @RequestMapping
    public String login(HttpServletRequest request, HttpServletResponse response) {
        Cookie cookie = new Cookie("test-cookie", "123");
        response.addCookie(cookie);
        return "/login/loginPage";
    }
}
